import request from '@/utils/request';
import urls from "./url";

function login(data: any) {
    return request({
        url: urls.login,
        method: 'post',
        data
    })
}
function logout() {
    return request({
        url: urls.logout,
        method: 'post'
    })
}
function getUserInfo() {
    return request({
        url: urls.userInfo,
        method: 'get'
    })
}
function registerUser() {
    return request({
        url: urls.register,
        method: 'post'
    })
}

export {
    logout,
    login,
    getUserInfo,
    registerUser
}
